' 调试输出到控制台
' CScript '.\Fast port=9000.vbs'
' WScript.Echo Each

dim port    ' 端口
port = "9000"
'------------------- 从文件名获取端口
str=createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName)
strarr=split(str,"\")
port_ = strarr(ubound(strarr))
port = Replace(Mid(port_,InStr(port_,"port=")+5,9999),".vbs","")


Set objShell = CreateObject("Wscript.Shell")
' objShell.Run("powershell.exe -noexit .\test.ps1")
objShell.Run( _
    "powershell.exe -noexit conda activate jptLab;"&_
    "write-host 'HTTP START';"&_
    "Start-Process -FilePath http://127.0.0.1:"&port&";"&_
    "python -m http.server "&port&";"&_
    "")